import java.util.Scanner;
import java.util.ArrayList;

public class HomeWork15_01{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrayList<Computer> cList = new ArrayList<Computer>();
        
        for(int i = 0; i < 3; i++){
            Computer tmp = new Computer();
            System.out.println("第" + (i + 1) + "台计算机");
            
            System.out.print("设置CPU型号：");
            String m = scan.next();
            tmp.setCPUModel(m);
            
            System.out.print("设置主板型号：");
            m = scan.next();
            tmp.setMotherBoardModel(m);
            
            System.out.print("设置硬盘大小: ");
            String s = scan.next();
            tmp.setHardDirveSize(s);
            
            System.out.print("设置内存大小：");
            s = scan.next();
            tmp.setMemorySize(s);
            
            System.out.print("设置GPU型号：");
            m = scan.next();
            tmp.setGPUModel(m);
            
            System.out.print("设置价格：");
            float p = scan.nextFloat();
            tmp.setPrice(p);
            
            System.out.println();
            
            cList.add(tmp);
        }
        
        for(int i = 0; i < cList.size(); i++){
            cList.get(i).show();
        }
    }
}

class Computer{
    String id;
    String CPUModel;
    String motherBoardModel;
    String hardDriveSize;
    String memorySize;
    String GPUModel;
    float price;
    static int computerCount = 0;
    
    public Computer(){
        id = String.valueOf(computerCount);
        ++computerCount;
    }
    
    public void setCPUModel(String m){
        CPUModel = m;
    }
    public void setMotherBoardModel(String m){
        motherBoardModel = m;
    }
    public void setHardDirveSize(String s){
        hardDriveSize = s;
    }
    public void setMemorySize(String s){
        memorySize = s;
    }
    public void setGPUModel(String m){
        GPUModel = m;
    }
    public void setPrice(float p){
        price = p;
    }
    
    public void show(){
        System.out.println("-----------------");
        System.out.println("编号: " + id);
        System.out.println("CPU型号: " + CPUModel);
        System.out.println("主板型号: " + motherBoardModel);
        System.out.println("硬盘大小: " + hardDriveSize);
        System.out.println("内存大小: " + memorySize);
        System.out.println("GPU型号: " + GPUModel);
        System.out.println("价格: " + price);
        System.out.println("-----------------");        
        System.out.println();
    }
    public float getPrice(){
        return price;
    }
}